package sn.hn.demo.image;

import sn.hn.demo.R;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;

public class ImageData {
	public static Bitmap mCa1;
	public static Bitmap mCa1up;
	public static Bitmap mCa2;
	public static Bitmap mCa2up;
	public static Bitmap mCa3;
	public static Bitmap mCa3up;
	public static Bitmap mCa4;
	public static Bitmap mCa4up;
	public static Bitmap mCa5;
	public static Bitmap mCa5up;
	public static Bitmap mCa6;
	public static Bitmap mCa6up;
	public static Bitmap mCloud;
	public static Bitmap mCloud1;
	public static Bitmap mCloud2;
	public static Bitmap mCloud3;
	public static Bitmap mCloud4;
	public static Bitmap mBubbles1;
	public static Bitmap mBubbles2;
	public static Bitmap mBubbles3;
	public static Bitmap mBubbles4;
	public static Bitmap mBubbles5;
	public static Bitmap mBubbles6;
	public static Bitmap mBoat;
	public static Bitmap mBackground;
	public static Bitmap mBackgroundShop;
	public static Bitmap mMermaid;
	public static Bitmap mSo;
	public static Bitmap mItem1;
	public static Bitmap mItem2;
	public static Bitmap mItem3;
	public static Bitmap mItem4;
	public static Bitmap mSquare;
	public static Bitmap mMoc;
	private static float delta = 0.8f;
	
	public static void loadData(Context context)
	{
		mBoat = BitmapFactory.decodeResource(context.getResources(), R.drawable.boat);
		mBackground = BitmapFactory.decodeResource(context.getResources(), R.drawable.map);
		mMoc = BitmapFactory.decodeResource(context.getResources(), R.drawable.moccau);
		// Image Shop
		mBackgroundShop = BitmapFactory.decodeResource(context.getResources(), R.drawable.shop);
		mMermaid = BitmapFactory.decodeResource(context.getResources(), R.drawable.mermaid);
		mSo = BitmapFactory.decodeResource(context.getResources(), R.drawable.so);
		mItem1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.co3la);
		mItem2 = BitmapFactory.decodeResource(context.getResources(), R.drawable.giun);
		mItem3 = BitmapFactory.decodeResource(context.getResources(), R.drawable.daythung);
		mItem4 = BitmapFactory.decodeResource(context.getResources(), R.drawable.donghocat);
		mSquare = BitmapFactory.decodeResource(context.getResources(), R.drawable.ovuong);
		// Image Fish
		mCa1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca1);
		mCa1up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca1up);
		mCa2 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca2);
		mCa2up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca2up);
		mCa3 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca3);
		mCa3up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca3up);
		mCa4 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca4);
		mCa4up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca4up);
		mCa5 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca5);
		mCa5up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca5up);
		mCa6 = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca6);
		mCa6up = BitmapFactory.decodeResource(context.getResources(), R.drawable.ca6up);
		// Image Bubbles
		mBubbles1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		mBubbles2 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		mBubbles3 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		mBubbles4 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		mBubbles5 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		mBubbles6 = BitmapFactory.decodeResource(context.getResources(), R.drawable.bongbe);
		// Image Cloud
		mCloud = BitmapFactory.decodeResource(context.getResources(), R.drawable.may);
		mCloud1 = BitmapFactory.decodeResource(context.getResources(), R.drawable.may1);
		mCloud2 = BitmapFactory.decodeResource(context.getResources(), R.drawable.may2);
		mCloud3 = BitmapFactory.decodeResource(context.getResources(), R.drawable.may3);
		mCloud4 = BitmapFactory.decodeResource(context.getResources(), R.drawable.may4);
	}
	
	/**Resize Image Fish comfortable all screen size*/
	public static void resize()
	{
		mMoc = ResizeImage.getResizedBitmap(mMoc, mMoc.getHeight()*0.7f, mMoc.getWidth() * 0.7f);
		mSo = ResizeImage.getResizedBitmap(mSo, mSo.getHeight()*delta, mSo.getWidth() * delta);
		mSquare = ResizeImage.getResizedBitmap(mSquare, mSquare.getHeight()*delta, mSquare.getWidth() * delta);
		mItem1 = ResizeImage.getResizedBitmap(mItem1, mItem1.getHeight()*delta, mItem1.getWidth() * delta);
		mItem2 = ResizeImage.getResizedBitmap(mItem2, mItem2.getHeight()*delta, mItem2.getWidth() * delta);
		mItem3 = ResizeImage.getResizedBitmap(mItem3, mItem3.getHeight()*delta, mItem3.getWidth() * delta);
		mItem4 = ResizeImage.getResizedBitmap(mItem4, mItem4.getHeight()*delta, mItem4.getWidth() * delta);
		mCa1 = ResizeImage.getResizedBitmap(mCa1, mCa1.getHeight() * delta, mCa1.getWidth() * delta);
		mCa1up = ResizeImage.getResizedBitmap(mCa1up, mCa1up.getHeight() * delta, mCa1up.getWidth() * delta);
		mCa2 = ResizeImage.getResizedBitmap(mCa2, mCa2.getHeight() * delta, mCa2.getWidth() * delta);
		mCa2up = ResizeImage.getResizedBitmap(mCa2up, mCa2up.getHeight() * delta, mCa2up.getWidth() * delta);
		mCa3 = ResizeImage.getResizedBitmap(mCa3, mCa3.getHeight() * delta, mCa3.getWidth() * delta);
		mCa3up = ResizeImage.getResizedBitmap(mCa3up, mCa3up.getHeight() * delta, mCa3up.getWidth() * delta);
		mCa5 = ResizeImage.getResizedBitmap(mCa5, mCa5.getHeight() * delta, mCa5.getWidth() * delta);
		mCa5up = ResizeImage.getResizedBitmap(mCa5up, mCa5up.getHeight() * delta, mCa5up.getWidth() * delta);
	}
	
}
